Skip to content

Conversation

@giswqs
Copy link
Contributor

@giswqs giswqs commented Nov 16, 2025


🔍 Preview: https://geojupyter-workshop-open-source-geospatial--30.org.readthedocs.build/
Note: This Pull Request preview is provided by ReadTheDocs. Our production website, however, is currently deployed with GitHub Pages.

Removed embedded Google Slides iframe from the AI integration module.
Copy link
Member

@mfisher87 mfisher87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, left a little nitpick :)

A few other notes:

  • I started running this notebook in Colab about 30 minutes ago and it's still training. Are participants expected to run training during the workshop? How long do you expect it to take? What will they do while they wait?
  • Can we run this on CryoCloud? There is a GPU option available. @tsnow03 just granted me access. I'll test this there as well. With GPUs available in CryoCloud, is it OK to run this Notebook there instead of Colab?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the environment setup instructions, what do you think of changing to install mamba first, then install the other dependencies in one command?

conda create -n geo -c conda-forge mamba
conda activate geo
mamba install -c conda-forge python=3.12 geoai

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, participants can choose Colab, CryoCloud, or their own GPU machine. I will be using my own machine with 96 GB GPU for demo. Participants may not be able to run all sections with limited GPU. It is fine. This section is mostly for demonstration purpose only. It is unlikely to chain a good model in a few minutes to limited GPU.

@mfisher87
Copy link
Member

Colab just notified me "Your session crashed after using all available RAM." 😭

@mfisher87
Copy link
Member

I will be using my own machine with 96 GB GPU for demo. Participants may not be able to run all sections with limited GPU. It is fine. This section is mostly for demonstration purpose only.

OK sounds good then! I'd love to test if this works on CryoCloud so we can demo the Notebook in a familiar environment instead of introducing Colab, which may be unfamiliar to some. Have you tested it already? Does it need any new dependencies in the container environment?

@giswqs
Copy link
Contributor Author

giswqs commented Nov 19, 2025

Yes, only the geoai package dependency is needed.

mamba install -c conda-forge geoai "pytorch=*=cuda*"

@mfisher87
Copy link
Member

OK I'll add that to this PR and then the docker build tests will kick in. One moment, please ⌛

@mfisher87
Copy link
Member

The conda package specification style "pytorch=*=cuda*" looks a bit unfamiliar to me. I went ahead and put it in the environment.yml! Does it look good to you?

@giswqs
Copy link
Contributor Author

giswqs commented Nov 19, 2025

It forces it to install the pytorch GPU version. Otherwise, some env might just the CPU version

@mfisher87
Copy link
Member

The environment fails to solve with these new dependencies. Trying with python>=3.12 instead of python==3.13. I'm not sure if that will fix it, just a guess. These conflict reports are hard to read. Any idea how to address the failure @giswqs ?

@giswqs
Copy link
Contributor Author

giswqs commented Nov 19, 2025

Installing pytorch is aways a tricky issue. I would not try to build it with GitHub actions. Just skip executing the notebook. Otherwise, it will take forever to run the notebook and build the website.

@mfisher87
Copy link
Member

mfisher87 commented Nov 19, 2025

We are currently not executing the Notebook. I'm trying to add pytorch to the Docker image we'll use on CryoCloud so you can execute this Notebook in CryoCloud instead of Colab on the day of the workshop. Any idea how we can fix this so the conda environment is solvable and we can build the Docker image?

@giswqs
Copy link
Contributor Author

giswqs commented Nov 19, 2025

Try Python 3.12. Some pytorch GPU dependencies might not support Python 3.13

@mfisher87
Copy link
Member

Tried that in 0f9617f, no luck :(

@giswqs
Copy link
Contributor Author

giswqs commented Nov 19, 2025

Try the following sequence to track down which package dependencies cause the issue.

  1. "pytorch"
  2. "pytorch==cuda"
  3. "geoai"

@mfisher87
Copy link
Member

Try the following sequence to track down which package dependencies cause the issue.

1. "pytorch"

2. "pytorch=_=cuda_"

3. "geoai"

Thanks!

  1. "pytorch" - builds successfully
  2. "pytorch=*=cuda* - fails to solve with similar output to GitHub Actions
  3. "geoai" - builds successfully

@giswqs
Copy link
Contributor Author

giswqs commented Nov 20, 2025

That means pytorch GPU version can't be installed in that docker image. Although geoai installs successfully, it only installs the pytorch CPU version.

The docker image needs to have cuda installed before installing pytorch GPU. Here is the official docker images: https://hub.docker.com/r/pytorch/pytorch/tags

I am not sure if it is worth your time to go through it.

@mfisher87
Copy link
Member

mfisher87 commented Nov 20, 2025

OK. Let's remove 0f9617f and 1b46f1e and merge this PR? Maybe we can figure out how to do this in cryocloud in the future.

@tylere
Copy link
Contributor

tylere commented Nov 21, 2025

FWIW, I seem to have been able to install the GPU version of pytorch on the CryoCloud hub.

gh pr checkout 30
mamba install geoai
mamba install "pytorch=*=cuda*"
import torch

print("CUDA available:", torch.cuda.is_available())
print("Number of GPUs:", torch.cuda.device_count())
if torch.cuda.is_available():
    current = torch.cuda.current_device()
    print("Current GPU:", torch.cuda.get_device_name(current))
python modules/03-integrating-ai/test_pytorch.py 
CUDA available: True
Number of GPUs: 1
Current GPU: Tesla T4

@mfisher87
Copy link
Member

  #21 96.09     └─ pytorch =* cuda* is not installable because there are no viable options
  #21 96.09        ├─ pytorch [1.11.0|1.12.0|...|2.8.0] would require
  #21 96.09        │  └─ __cuda =* *, which is missing on the system;

@mfisher87 mfisher87 merged commit eb77528 into geojupyter:main Nov 24, 2025
2 checks passed
@giswqs giswqs deleted the geoai branch November 24, 2025 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants